package com.arpa.wms.cancel.delivery;

import com.arpa.wms.cancel.DeliveryCancelHandlerTypeConstants;
import com.arpa.wms.domain.entity.Delivery;
import com.arpa.wms.service.IDeliveryService;
import com.arpa.wms.service.IOutboundService;
import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

/**
 * 待出库订单取消处理
 * 1、更新订单状态作废；
 * 2、分配库存退回退拣库位；
 * 3、更新出库单取消数量
 * @author leo
 */
@Log4j2
@Component(DeliveryCancelHandlerTypeConstants.UN_DELIVERY)
public class UnDeliveryCancelHandler extends UnRecheckCancelHandler {

    public UnDeliveryCancelHandler(IOutboundService outboundService) {
        super(outboundService);
    }

    @Override
    @Transactional(rollbackFor = Exception.class)
    public boolean handle(IDeliveryService deliveryService, Delivery delivery) {
        return super.handle(deliveryService,delivery);
    }


}
